package cn.sptpc.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * 业务处理
 */
public interface UserService {

    /**
     * 登录
     * @return
     */
   String verifyUserLogin(HttpServletRequest request);

    /**
     * 获取个人信息
     * @param request
     * @return
     */
   String getUserInfo(HttpServletRequest request);

    /**
     * 获取指定用户的信息
     * @param id
     * @return
     */
   String getUserInfo(long id);

    /**
     * 头像上传
     * @param request
     * @return
     */
   String fileUpload(HttpServletRequest request);

    /**
     * 获取头像
     * @param request
     * @param response
     * @return
     */
   InputStream getUserFace(HttpServletRequest request,  HttpServletResponse response);

    /**
     * 分页获取用户
     * @param request
     * @return
     */
   String getAllUser(HttpServletRequest request);

    /**
     * 添加用户
     * @param request
     * @return
     */
   String insertUser(HttpServletRequest request);

    /**
     * 验证Id
     * @param request
     * @return
     */
   String checkUserId(HttpServletRequest request);

    /**
     * 查询用户
     * @param request
     * @return
     */
   String queryUser(HttpServletRequest request);

    /**
     * 删除用户
     * @param request
     * @return
     */
   String deleteUser(HttpServletRequest request);

    public String updataUser(HttpServletRequest request);
}
